home *** CD-ROM | disk | FTP | other *** search
- ; MSDOS 2.10 PROGRAM SEGMENT PREFIX STRUCTURE
- ;
- ; ORG 0
- ;
- ;--------NOTE THAT THIS IS GENERATED BY THE LOADER AND SHOULD NOT
- ; BE INCLUDED IN ANY PROGRAMS
- ;
- QUIT: INT 20H ;CP/M-style warm-boot at end of program
- FREE DW (?) ;segment of first free memory above pgm
- ;filled in when PSP is built by INT 21 FN 26 or 55
- DB (?) ;unknown
- BDOS DB 9AH ;CS:0005--CALL FAR opcode for CP/M-style dispatching
- DW 16*[FREE] ;number of bytes in pgm, -16
- DW 12-[FREE] ;fake segment for FAR CALL, set up by
- ;build-PSP routine to put call's actual
- ;address at 0000:00C0 via wraparound!
- ;This, in turn, has FAR JUMP to DOS dispatch
- ;
- OLD22 DWORD (?) ;CS:000A--INT-22 vector of parent program
- OLD23 DWORD (?) ;CS:000E--INT-23 (CTRL-C) vector of parent program
- OLD24 DWORD (?) ;CS:0012--INT-24 (fatal error) vector of parent
- OLDPSP DW (?) ;CS:0016--PSP Segment of parent program
- ;
- HANTBL DB 01 ;CS:0018--Current STDIN (handle 0) FCB index
- ;May be changed by DOS redirection feature
- DB 01 ;CS:0019--Current STDOUT (handle 1) FCB index
- ;May be changed by DOS redirection feature
- DB 01 ;CS:001A--Current STDERR (handle 2) FCB index
- ;Cannot be redirected by DOS features
- DB 00 ;CS:001B--Current AUX: (handle 3) FCB index
- ;Cannot be redirected by DOS features
- DB 02 ;CS:001C--Current PRN: (handle 4) FCB index
- ;Cannot be redirected by DOS features
- DB 15 DUP(0FFH)
- ;User file handle FCB index entries. FF means
- ;entry is not used. Otherwise these point to 40-byte
- ;FCB/DCB blocks in the main DOS segment.
- ;These values are copied from parent's PSP so that all open
- ;files are passed to the new program
- ;
- ENVIR DW (?) ;CS:002C--Segment for current Environment area.
- ;Is separate copy from that of parent, made by Build-PSP
- SAVESP DW (?) ;CS:002E--Saved SP (offset) last time INT 21 used.
- SAVESS DW (?) ;CS:0030--Saved SS (segment) last time INT 21 used.
- ;
- DB 30 DUP(0)
- ;unknown significance, apparently not used for
- ;anything in version 2.10. may be used with 3.x
- ;
- DISPAT: INT 21H ;CS:0050--long call to DOS function dispatcher
- RET FAR
- ;
- DB 9 DUP(0)
- ;unknown significance, apparently unused.
- ;
- FCB1 DB 0,11 DUP(' ') ;CS:005C--per manuals
- DW 0
- DW 0
- FCB2 DB 0,11 DUP(' ') ;CS:006C--per manuals
- DW 0
- DW 0
- ;
- DB 4 DUP(0) ;unknown, apparently not used.
- ;
- DEFDTA DB 0 ;count of command-tail characters, not including CR
- DB 127 DUP (?)
- ;command-tail buffer, holds command line.
- ;This area is also assigned by the loader as the default DTA
- ;
- ; END OF PROGRAM SEGMENT PREFIX
-